﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using BCCommon.TradingEnums;

namespace BCDto.Trading.Purchase.GoodsPurchase
{
    /// <summary>
    /// 商品采购单
    /// </summary>
    public class GoodsPurchaseDto
    {
        /// <summary>
        /// 商品采购单Id
        /// </summary>		
        public long GoodsPurchaseId { get; set; }
        /// <summary>
		/// 商品采购单编号
        /// </summary>		
        public string GoodsPurchaseNo { get; set; }
        /// <summary>
        /// 定金金额
        /// </summary>		
        public decimal DepositAmount { get; set; }
        /// <summary>
        /// 尾款金额
        /// </summary>		
        public decimal LastPaymentAmount { get; set; }
        /// <summary>
        /// 合计金额
        /// </summary>		
        public decimal RecordAmount { get; set; }
        /// <summary>
        /// 支持售出后次月付尾款
        /// </summary>		
        public bool SupportSoldPayment { get; set; }
        /// <summary>
		/// 采购单状态
        /// </summary>		
        public PurchaseStatusType PurchaseStatus { get; set; }
        /// <summary>
        /// 采购单状态
        /// </summary>		
        public string PurchaseStatusStr { get; set; }
        /// <summary>
        /// 提醒消息（界面使用）
        /// </summary>
        public string AlterMessage { get; set; }
        /// <summary>
        /// 提醒状态（界面使用）
        /// </summary>
        public string AlterStatus
        {
            get
            {
                string status = "info";
                switch (this.PurchaseStatus)
                {
                    case PurchaseStatusType.Done:
                        status = "success";
                        this.AlterMessage = "采购已完成";
                        break;
                    case PurchaseStatusType.Running:
                        status = "success";
                        this.AlterMessage = "采购正在进行中....";
                        break;
                    case PurchaseStatusType.Suspend:
                        status = "warning";
                        this.AlterMessage = "采购已被暂停";
                        break;
                    case PurchaseStatusType.Stop:
                        status = "error";
                        this.AlterMessage = "采购已终止";
                        break;
                    default:
                        this.AlterMessage = "尚未开始采购流程!!!";
                        break;
                }
                return status;
            }
        }
        /// <summary>
        /// 创建人Id
        /// </summary>		
        public long CreateAdminId { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>		
        public string CreateAdminName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>		
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>		
        public DateTime UpdateTime { get; set; }
        /// <summary>
        /// 修改人Id
        /// </summary>		
        public long? EditAdminId { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>		
        public string EditAdminName { get; set; }
        /// <summary>
        /// 出纳执行时间
        /// </summary>		
        public DateTime? HandleTime { get; set; }
        /// <summary>
        /// 已通知采购经理
        /// </summary>		
        public bool HasNotifyPurchaseManage { get; set; }
        /// <summary>
        /// 定金支付日期
        /// </summary>		
        public DateTime? DepositePaymentDate { get; set; }
        /// <summary>
        /// 最后一次尾款支付日期
        /// </summary>		
        public DateTime? LastPaymentDate { get; set; }
        /// <summary>
        /// 定金凭证编号
        /// </summary>		
        public string DepositePaymentCertificateNo { get; set; }
        /// <summary>
        /// 最后一次尾款凭证编号
        /// </summary>		
        public string LastPaymentCertificateNo { get; set; }
        /// <summary>
        /// 已付定金金额
        /// </summary>		
        public decimal? PaidDepositeAmount { get; set; }
        /// <summary>
        /// 已付尾款金额
        /// </summary>		
        public decimal? PaidLastAmount { get; set; }
        /// <summary>
        /// 最后一次支付尾款金额
        /// </summary>		
        public decimal? LatestPaidLastAmount { get; set; }
        /// <summary>
		/// 暂停备注
        /// </summary>		
        public string SuspendRemark { get; set; }
        /// <summary>
        /// 暂停时间
        /// </summary>		
        public DateTime? SuspendTime { get; set; }
        /// <summary>
        /// 暂停恢复备注
        /// </summary>		
        public string RestoreRemark { get; set; }
        /// <summary>
        /// 暂停恢复时间
        /// </summary>		
        public DateTime? RestoreTime { get; set; }
        /// <summary>
        /// 终止备注
        /// </summary>		
        public string StopRemark { get; set; }
        /// <summary>
        /// 终止时间
        /// </summary>		
        public DateTime? StopTime { get; set; }
        /// <summary>
        /// 库存状态
        /// </summary>
        public PurchaseInventoryStatusType? InventoryStatus { get; set; }
        /// <summary>
        /// 库存状态
        /// </summary>
        public string InventoryStatusStr { get; set; }
        /// <summary>
        /// 交付日期
        /// </summary>
        public DateTime? DeliveryDate { get; set; }
        /// <summary>
        /// 采购合同编号
        /// </summary>
        public string PurchaseContractNo { get; set; }
        /// <summary>
        /// 采购合同备注
        /// </summary>
        public string PurchaseContractRemark { get; set; }
    }
}

